<!DOCTYPE html>
<html lang='en'>

<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title></title>
  <script type='text/javascript' src='js/vue-2.6.10.js'></script>
  <style>
    .current {
      color: orange;
    }
  </style>
</head>

<body>
  <div id='app'>
    <fruit-list :list="list">
      <template slot-scope="{info}">
        <strong v-if="info.id==2" class="current">{{info.name}}</strong>
        <span v-else >{{info.name}}</span>
      </template>
    </fruit-list>
  </div>
  <script type='text/javascript'>
    Vue.component('fruit-list', {
      props: ['list'],
      template: `
        <ul>
          <li v-for="item in list" :key="item.id">
            <slot :info="item">{{ item.name }}</slot>
          </li>
        </ul>
      `,
    })
    var vm = new Vue({
      el: '#app',
      data: {
        list: [{
          id: 1,
          name: 'apple'
        }, {
          id: 2,
          name: 'orange'
        }, {
          id: 3,
          name: 'banana'
        }]
      },
      methods: {

      }
    });
  </script>
</body>

</html>